package com.share.simple.rest;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
//import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:caifan
 * @since 2023/7/7
 */
@Tag(name = "测试")
@RestController
@RequestMapping("/hello")
public class HelloRest {

    @Operation(summary = "测试0")
//    @PreAuthorize("hasRole('admin')")
    @GetMapping("/test0")
    public String getTest0() {
        return "test0";
    }

    @Operation(summary = "测试1")
//    @PreAuthorize("hasRole('common')")
    @GetMapping("/test1")
    public String getTest1() {
        return "test0";
    }
}
